]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - Super Polarity/SuperPolarity.cs
I think bullets come out now.
[rbdr/super-polarity] / Super Polarity / SuperPolarity.cs
index b590079bf248f065530b48775c10083b6013c8c4..21d1ed444af2f0cec8fcdfaa2e2c3d8005471fdc 100644 (file)
@@ -20,6 +20,8 @@ namespace SuperPolarity
         public static GraphicsDeviceManager graphics;
         SpriteBatch spriteBatch;
 
+        public static int OutlierBounds;
+
         public SuperPolarity()
             : base()
         {
@@ -27,6 +29,8 @@ namespace SuperPolarity
             SuperPolarity.graphics.PreferMultiSampling = true;
             Content.RootDirectory = "Content";
             ActorFactory.SetGame(this);
+            ParticleEffectFactory.SetGame(this);
+            ActorManager.SetGame(this);
         }
 
         /// <summary>
@@ -39,6 +43,8 @@ namespace SuperPolarity
         {
             base.Initialize();
 
+            OutlierBounds = 100;
+
             InputController.RegisterEventForButton("changePolarity", Buttons.A);
             InputController.RegisterEventForKey("changePolarity", Keys.Z);
 
@@ -57,9 +63,9 @@ namespace SuperPolarity
 
             Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2);
 
-            ActorFactory.CreateShip(Ship.Polarity.Positive, new Vector2(200, 200));
-            ActorFactory.CreateShip(Ship.Polarity.Negative, new Vector2(400, 200));
-            ActorFactory.CreateMainShip(playerPosition);
+            Renderer.CheckIn(ActorFactory.CreateMainShip(playerPosition));
+            Renderer.CheckIn(ActorFactory.CreateShip(Ship.Polarity.Positive, new Vector2(200, 200)));
+            Renderer.CheckIn(ActorFactory.CreateShip(Ship.Polarity.Negative, new Vector2(400, 200)));
         }
 
         /// <summary>
@@ -99,7 +105,7 @@ namespace SuperPolarity
 
             spriteBatch.Begin();
 
-            ActorManager.Draw(spriteBatch);
+            Renderer.Draw(spriteBatch);
 
             spriteBatch.End();